package com.sky.mapper;

import com.sky.entity.User;
import com.sky.service.impl.ReportServiceImpl;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * @author : 黑渊白花
 * @ClassName UserMapper
 * @date : 2025/8/10 20:35
 * @Description
 */
@Mapper
public interface UserMapper {

    @Select("select * from user where openid = #{openid}")
    User getByOpenid(String openid);


    void insert(User user);

    @Select("select * from user where id = #{userId}")
    User getById(Long userId);

    ReportServiceImpl.UserDate  sumUser(Map map);

    List<ReportServiceImpl.UserDate> batchCountUserStats(@Param("dates") List<LocalDate> dates);


}
